package com.haha.Mappers;
import com.haha.Beans.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

// 映射类，即处理数据库查询命令
@Mapper
@Repository
public interface BookMapper {
    List<Book> getAllBooks();
    Book selectById(Integer id);
    Integer getAllBooksCount();
    Integer insertBook(Book record);
    Integer deleteBook(@Param("bookId") Integer id);
    Integer updateBook(@Param("bookId") Integer id,@Param("record") Book record);
}
